//
//  Player.h
//  Maze
//
//  Created by Lin Tian on 9/19/11.
//  Copyright 2011 tina. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "Item.h"

#define VIEWPORT 45
#define VIEWRADIUS 400
#define VIEWTAG 2

@class Room;

@interface Player : NSObject {
	CCSprite *_playerSprite;
    CGPoint _speed;
    CGPoint _position;
	unsigned int _playerId;
	Room* _room;
    unsigned int _forceId;
    unsigned char _loadingProgress;
    NSMutableArray *itemList;
}

+(id) player;
+(id) playerWithPlayerId:(unsigned int)playerId name:(NSString*)playerName;
-(id) initWithPlayerId:(unsigned int)playerId name:(NSString*)playerName;

-(id) initSpriteWithParentNode:(CCNode*)parentNode position:(CGPoint)loc;
-(void)removeFootPrint:(CCNode*)node;

@property (nonatomic, retain) CCSprite *playerSprite;
@property (nonatomic,readwrite, assign) CGPoint speed;
@property (nonatomic,readwrite, assign) CGPoint position;
@property (nonatomic) unsigned int playerId;
@property (nonatomic, retain) Room* room;
@property (nonatomic) unsigned int forceId;
@property (nonatomic) unsigned char loadingProgress;
@property (nonatomic, retain) NSMutableArray *itemList;
@end
